home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 8434 / 8434.xpi / chrome / content / seamonkeyCompat.js < prev    next >
Text File  |  2008-11-16  |  1KB  |  37 lines

  1. if (typeof openUILinkIn == "undefined") {
  2.     function openUILinkIn(url, where, allowThirdPartyFixup, postData) {
  3.         if (!where || !url) {
  4.             return;
  5.         }
  6.         if (where == "save") {
  7.             saveURL(url, null, null, true);
  8.             return;
  9.         }
  10.  
  11.         var w = getTopWin();
  12.  
  13.         if (!w || where == "window") {
  14.             openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no,centerscreen", url, null, null, postData, allowThirdPartyFixup);
  15.             return;
  16.         }
  17.         var browser = w.document.getElementById("content");
  18.         var loadInBackground = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getBoolPref("browser.tabs.loadInBackground", "false");
  19.  
  20.         switch (where) {
  21.             case "current":
  22.                 browser.loadURI(url);
  23.                 w.content.focus();
  24.                 break;
  25.             case "tabshifted":
  26.                 loadInBackground = !loadInBackground;
  27.                             case "tab":
  28.                 browser.addTab(url, null, null, !loadInBackground);
  29.                 break;
  30.         }
  31.     }
  32. }
  33. if (typeof checkForMiddleClick == "undefined") {
  34.     function checkForMiddleClick() {
  35.     }
  36. }
  37.